package huawei;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;

/**
 * 最大值
 */
public class Q120 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String string = sc.nextLine();

        List<String> collect = Arrays.stream(string.split(" ")).collect(Collectors.toList());

        collect.sort((str1, str2) -> {
            return Integer.parseInt(str2 + str1 ) - Integer.parseInt(str1 + str2);
        });

        StringBuilder builder = new StringBuilder();
        for (String s : collect) {
            builder.append(s);
        }
        System.out.println(builder.toString());
    }
}
